﻿@model SDSystem.Models.GroupDish
@using Ext.Net
@using Ext.Net.MVC
@{
    ViewBag.Title = "EditGroupDishes";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


@(Html.X().FormPanel()
      .ID("EditGDishesView")
      .BodyPadding(5)
      .Buttons(buttons =>
                   {
                       buttons.Add(
                           Html.X().Button().Text("Save").Icon(Icon.Disk).DirectEvents(
                               de =>
                                   {
                                       de.Click.IsUpload = true;
                                       de.Click.Confirmation.ConfirmRequest = true;
                                       de.Click.Confirmation.Title = "Save";
                                       de.Click.Confirmation.Message = "Confirm?";
                                       de.Click.Url = Url.Action("EditGroupDishes");
                                       de.Click.EventMask.ShowMask = true;
                                       de.Click.FormID = "EditGDishesView";
                                   })
                           );
                       buttons.Add(
                           Html.X().Button().Text("Back").Icon(Icon.PreviousGreen)
                           );
                   })
      .Items(
          Html.X().FieldSet().Title("GroupDishes Details").Layout(LayoutType.Form).Padding(5).Items(
              Html.X().HiddenFor(m=>m.GroupDishesId),
              Html.X().TextFieldFor(m=>m.GroupName).FieldLabel("GroupDishes Name").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().FileUploadField().ID("imgUpload").FieldLabel("Upload Image").Text("Image Url").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top).Value(ViewBag.GroupDishesImage),
              Html.X().HtmlEditorFor(m => m.Description).FieldLabel("Description").Height(150).LabelWidth(100).LabelAlign(LabelAlign.Top),
              Html.X().TextFieldFor(m => m.Tag).FieldLabel("Tag").LabelWidth(100).Width(600).LabelAlign(LabelAlign.Top),
              Html.X().CheckboxFor(m=>m.IsActive).FieldLabel("Is Active?").LabelAlign(LabelAlign.Top))))
